package com.szl.yeb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.szl.yeb.common.R;
import com.szl.yeb.dto.AdminPasswordInfo;
import com.szl.yeb.dto.LoginInfo;
import com.szl.yeb.entity.Admin;
import com.szl.yeb.common.PageResult;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 用户信息(Admin)表服务接口
 *
 * @author szl
 * @since 2022-08-24 16:21:21
 */
public interface AdminService extends IService<Admin> {

    PageResult getPage(Integer currentPage, Integer size, Admin admin);

    R<Object> login(LoginInfo loginInfo, HttpServletRequest request);

    R<Object> getAdminInfo();

    Admin getAdminByUsername(String username);

    List<Admin> selectOtherAdminsWithRoles(String keyword);

    Boolean updateCurrentAdminOnPassword(AdminPasswordInfo adminPasswordInfo);

    Boolean updateCurrentAdminOnUserFace(String url, Authentication authentication, HttpServletResponse response);
}

